package com.ruoyi.production.service.impl.graftinglabel;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.production.domain.graftinglabel.GraftinglabelApplyTemporary;
import com.ruoyi.production.mapper.graftinglabel.GraftinglabelApplyTemporaryMapper;
import com.ruoyi.production.service.graftinglabel.IGraftinglabelApplyTemporaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 嫁接签临时申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-11
 */
@Service
public class GraftinglabelApplyTemporaryServiceImpl implements IGraftinglabelApplyTemporaryService
{
    @Autowired
    private GraftinglabelApplyTemporaryMapper graftinglabelApplyTemporaryMapper;

    /**
     * 查询嫁接签临时申请
     *
     * @param graftinglabelApplyTemporaryId 嫁接签临时申请ID
     * @return 嫁接签临时申请
     */
    @Override
    public GraftinglabelApplyTemporary selectGraftinglabelApplyTemporaryById(Long graftinglabelApplyTemporaryId)
    {
        return graftinglabelApplyTemporaryMapper.selectGraftinglabelApplyTemporaryById(graftinglabelApplyTemporaryId);
    }

    /**
     * 查询嫁接签临时申请列表
     *
     * @param graftinglabelApplyTemporary 嫁接签临时申请
     * @return 嫁接签临时申请
     */
    @Override
    public List<GraftinglabelApplyTemporary> selectGraftinglabelApplyTemporaryList(GraftinglabelApplyTemporary graftinglabelApplyTemporary)
    {
        return graftinglabelApplyTemporaryMapper.selectGraftinglabelApplyTemporaryList(graftinglabelApplyTemporary);
    }

    /**
     * 新增嫁接签临时申请
     *
     * @param graftinglabelApplyTemporary 嫁接签临时申请
     * @return 结果
     */
    @Override
    public int insertGraftinglabelApplyTemporary(GraftinglabelApplyTemporary graftinglabelApplyTemporary)
    {











        graftinglabelApplyTemporary.setCreateTime(DateUtils.getNowDate());



        return graftinglabelApplyTemporaryMapper.insertGraftinglabelApplyTemporary(graftinglabelApplyTemporary);
    }

    /**
     * 修改嫁接签临时申请
     *
     * @param graftinglabelApplyTemporary 嫁接签临时申请
     * @return 结果
     */
    @Override
    public int updateGraftinglabelApplyTemporary(GraftinglabelApplyTemporary graftinglabelApplyTemporary)
    {
        graftinglabelApplyTemporary.setUpdateTime(DateUtils.getNowDate());
        return graftinglabelApplyTemporaryMapper.updateGraftinglabelApplyTemporary(graftinglabelApplyTemporary);
    }

    /**
     * 批量删除嫁接签临时申请
     *
     * @param graftinglabelApplyTemporaryIds 需要删除的嫁接签临时申请ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelApplyTemporaryByIds(Long[] graftinglabelApplyTemporaryIds)
    {
        return graftinglabelApplyTemporaryMapper.deleteGraftinglabelApplyTemporaryByIds(graftinglabelApplyTemporaryIds);
    }

    /**
     * 删除嫁接签临时申请信息
     *
     * @param graftinglabelApplyTemporaryId 嫁接签临时申请ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelApplyTemporaryById(Long graftinglabelApplyTemporaryId)
    {
        return graftinglabelApplyTemporaryMapper.deleteGraftinglabelApplyTemporaryById(graftinglabelApplyTemporaryId);
    }
}
